<template>
  <div class="pane">
    <div class="maichu">
      <component
        ref="tradeForm"
        :is="type"
      />
      <handicap @clickPrice="handleHandicapClick" />
      <trading-list />
    </div>
  </div>
</template>

<script>
import Buy from './Buy'
import Sell from './Sell'
import Handicap from './Handicap'
import TradingList from './TradingList'
export default {
  components: { Buy, Sell, Handicap, TradingList },
  props: {
    type: {
      type: String,
      required: true
    }
  },
  methods: {
    handleHandicapClick (price) {
      this.$refs.tradeForm.setPrice(price)
    }
  },
  head () {
    return {
      title: this.$t('币币交易')
    }
  }
}
</script>
